<template>
	<view class="main-body" style="background: #F8F8FD;">
		<cu-custom :isBack="true" backRouterName="pollution" backFlag="navigate">
			<block slot="backText">返回</block>
			<block slot="content">{{bartitle}}</block>
		</cu-custom>
		<view class="container" style="padding: 0;" :style="[{marginTop:'calc('+CustomBar+ 'px - 2px)'}]">
			<view v-show="(isAdd&&type==1&&isLoaded)||(!isAdd&&isLoaded)||isAdd" :style="{margin:isAdd?'15px 0 75px 0':'15px 0'}">
				<form @submit="formSubmit" @reset="formReset" ref="editForm">
					<view class="img-box">
						<view class="row_style">
							<text class="title">
								污染名称</text>
						</view>
						<view class="colum_style other">
							<u--textarea  v-if="isAdd"  v-model="editForm.pollutionSourceName"
								placeholder="(必填)请输入污染名称" border="none"
								placeholderClass="placeholderStyle" maxlength="-1" autoHeight></u--textarea>
							<text v-if="!isAdd" class="good-price">{{editForm.checkedSituation | capitalize}}</text>
						</view>
					</view>
					<view class="img-box" style="padding-bottom: 0;">
						<view class="row_style">
							<text class="title">
								采集时间</text>
						</view>
						<view class="colum_style other" style="margin-top: -12px;">
							<!-- 列表list-->
							<view v-if="isAdd" class="cu-list menu  shadow-lg radius" style="width: 100%;">

								<view class="cu-item2 arrow">
									<!-- <my-date v-model="editForm.checkedTime" placeholder="(必填)请选择采集时间" fields="second">
									</my-date> -->
									<my-date v-model="editForm.checkedTime" placeholder="(必填)请选择采集时间" fields="minute">
									</my-date>
								</view>
							</view>
							<!-- 详情-->
							<view class="item_1" style="padding: 12px 0;" v-if="!isAdd"><text
									class="good-price">{{editForm.checkedTime?editForm.checkedTime:'暂无'}}</text>
							</view>

						</view>
					</view>

					<view class="img-box" style="padding-bottom: 0;margin-bottom: 0;">
						<view class="row_style">
							<text class="title">检查地点</text>
						</view>
						<view class="colum_style other" style="margin-top: -12px;">
							<!-- 列表list-->
							<view class="cu-list menu  shadow-lg radius" style="width: 100%;">
								<view v-if="isAdd" class="cu-item2 arrow" @tap.stop="goMap(editForm.address)">
									<view class="cu-form-group"  @tap.stop="goMap(editForm.address)">
										<text class="good-price" @tap.stop="goMap(editForm.address)" style="padding: 10px 30px 5px 0;" :style="{color:editForm.address?'#606266':'#C0C4CC'}">{{editForm.address?editForm.address:'(必填)请选择检查位置'}}</text>
										<!-- <u--textarea :disabled="isAdd" v-model="editForm.address"
											placeholder="(必填)请选择检查位置" placeholderClass="placeholderStyle" maxlength="-1"
											border="none" autoHeight>
										</u--textarea> -->
									</view>
								</view>
								<!-- 详情-->
								<view v-if="!isAdd" class="cu-item2" @tap.stop="goMap(editForm.address)">
									<view class="cu-form-group" >
										<text class="good-price" @tap.stop="goMap(editForm.address)" style="padding: 10px 30px 5px 0;">{{editForm.address?editForm.address:'暂无'}}</text>
										<!-- <u--textarea disabled v-model="editForm.address"
											placeholder="" placeholderClass="placeholderStyle" maxlength="-1"
											border="none" autoHeight>
										</u--textarea> -->
										<u-icon color="#00a38a" @tap.stop="goMap(editForm.address)" size="20" name="map-fill"></u-icon>
									</view>

								</view>
							</view>
						</view>
					</view>
					<u-line color="#dadbde"></u-line>
					<view class="img-box" style="padding:10px 38.57rpx 10px 38.57rpx;">
						
						<view class="colum_style other" style="margin-top: 0px;">
							<u--textarea v-if="isAdd" v-model="editForm.detailAddress" :placeholder="!isAdd?'':'(选填)请输入详细位置'"
								placeholderClass="placeholderStyle" maxlength="-1" border="none" autoHeight>
							</u--textarea>
							<text v-if="!isAdd" class="good-price">{{editForm.detailAddress | capitalize}}</text>
						</view>
					</view>
					<view class="img-box" style="height:227px;padding-left: 5px;">
						<text class="good-price" style="padding-left: 13px;"
							v-if="editForm.imageList.length==0&&!isAdd">暂无图片</text>
						<my-image-upload v-if="isAdd&&type==0" :value2="[]" :label="text" @getData='testData' />
						<my-image-upload v-if="isAdd&&type==1" :value2="editForm.imageList" :isBase="true" :label="text"
							@getData='testData' />
						<view v-if="editForm.imageList.length>0&&!isAdd">
							<view class="cu-form-group">
								<view class="grid col-4 grid-square flex-sub">
									<view class="bg-img" v-for="(item,index) in editForm.imageList" :key="index"
										@tap="ViewImage(item,index)">
										<image :src=" 'data:image/png;base64,' + item.imageThumbnail"
											style="width: 100%;">
											</img>
									</view>
								</view>
							</view>
						</view>
					</view>

					<view class="img-box">
						<view class="row_style">
							<text class="title">
								检查情况</text>
						</view>
						<view class="colum_style other" style="">
							<u--textarea v-if="isAdd" border="none" v-model="editForm.checkedSituation"
								:placeholder="!isAdd?'':'(选填)请输入检查情况'" placeholderClass="placeholderStyle" maxlength="-1" autoHeight>
							</u--textarea>
							<text v-if="!isAdd" class="good-price">{{editForm.checkedSituation | capitalize}}</text>
						</view>
					</view>
					<view class="img-box">
						<view class="row_style">
							<text class="title">存在问题</text>

						</view>
						<view class="colum_style" style="">
							<u--textarea v-if="isAdd" border="none" v-model="editForm.question"
								:placeholder="!isAdd?'':'(选填)请输入问题详情'" placeholderClass="placeholderStyle" maxlength="-1" autoHeight>
							</u--textarea>
							<text v-if="!isAdd" class="good-price">{{editForm.question | capitalize}}</text>
						</view>
					</view>
					<!-- <view v-if="isAdd" class="img-box" style="padding: 10px 12px;margin-bottom: 0;">
						<view class="row_style">
							<view style="width: 100%;
								display: flex;
								align-items: center;
								justify-content: space-evenly;">

								<button form-type="submit" :disabled="isSubmit2"
									style="width: 85px;border-radius: 5px;color: #666;background: #fff; border: 1px solid #1cbbb4;"
									class="btnbox cu-btn" plain="true">暂存</button>
								<button @click="add(2)" :loading="loading2" :disabled="isSubmit" class="btnbox cu-btn"
									style="background: #1cbbb4;border-radius: 5px;" plain="true">提交上报</button>
							</view>

						</view>
					</view> -->
					<!-- <view class="img-box">
						<view class="row_style" style="margin-top: 40px;" v-if="isAdd">
							<button form-type="submit" :loading="loading" :disabled="isSubmit2"
								style=" background: #3c9cff;" class="btnbox cu-btn" plain="true">保存</button>
						</view>
					</view>
					<view class="img-box">
						<view class="row_style" style="margin-top: 12px;" v-if="isAdd">
							<button @click="add(2)" :loading="loading2" :disabled="isSubmit" class="btnbox cu-btn"
								style="background: #1cbbb4;" plain="true">保存并上报</button>
						</view>
					</view> -->
				</form>
			    <!-- 提交  -->
				<view v-if="isAdd" class="img-box cu-bar export fixed fixed2 bg-white" style="padding: 10px 12px;margin-bottom: 0;">
					<view class="row_style" style="width: 100%;">
						<view style="width: 100%;
							display: flex;
							align-items: center;
							justify-content: space-evenly;">
				
							<button @click="formSubmit" form-type="submit" :disabled="isSubmit2"
								style="width: 85px;border-radius: 5px;color: #666;background: #fff; border: 1px solid #1cbbb4;"
								class="btnbox cu-btn" plain="true">暂存</button>
							<button @click="add(2)" :loading="loading2" :disabled="isSubmit" class="btnbox cu-btn"
								style="background: #1cbbb4;border-radius: 5px;" plain="true">提交上报</button>
						</view>
				
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import api from '@/api/api'
	import myDate from '@/components/my-componets/my-date.vue'
	import {
		mapActions
	} from "vuex"
	import configService from '@/common/service/config.service.js'
	let apiUrl = configService.apiUrl;
	import myImageUpload from '@/components/my-componets/my-image-upload.vue'
	import {
		pathToBase64,
		base64ToPath
	} from '@/js_sdk/mmmm-image-tools'
	export default {
		// mixins: [MescrollMixin], // 使用mixin
		components: {
			myImageUpload,
			myDate
		},
		data() {
			return {
				//接口url
				bartitle: '巡查上报',
				CustomBar: this.CustomBar,
				StatusBar: this.StatusBar,
				type: '',
				dataUrl: '/pollution/getPollutionById',
				addUrl: '/pollution/add',
				modifyUrl: '/pollution/modify',
				showSex: false,
				isSubmit: false,
				isSubmit2: false,
				loading: false,
				loading2: false,
				isLoaded: false,
				isAdd: true,
				text: '检查照片',
				rules: {},
				model1: {
					userInfo: {
						sex: '今日',
					},
				},
				editForm: {

					"address": "",
					"detailAddress": "",
					"checkedTime": "",
					"imageList": [],
					"pollutionSourceName": "",
					"question": "",
					"status": "",
					"checkedSituation": "",
				},
				location: {
					latitude: "",
					longitude: ""
				},

				actions: [
					[{
							id: 1,
							name: '今日'
						},
						{
							id: 2,
							name: '当月'
						},

					]
				],
				newLevel: 0,
				imgSaveData: [

				],
				picList: [

				],
				oldImgList: [

				],
				oldImgDetailList: [

				],
				imageList: '',
				userIdentity: '',
			}
		},
		mounted() {},
		onLoad(option) {
			var that = this;
			console.log(this.$store.getters.userIdentity)
			this.userIdentity = this.$store.getters.userIdentity
			console.log(option)
			this.type = option.type;
			
			uni.showLoading({
				title: '加载中...',
				// mask: true
			});
			if (option.type == '0') {
				this.isAdd = true
				this.bartitle = '巡查上报'
				
				uni.getLocation({
					// type: 'gcj02',
					geocode: true,
					success: function(res) {

						console.log(res)
						console.log('当前位置的经度：' + res.longitude);
						console.log('当前位置的纬度：' + res.latitude);
						let url =
							'https://api.map.baidu.com/reverse_geocoding/v3/?ak=PmTFEuep7FmccxTrTn67TxRn&output=json&coordtype=wgs84ll&location=' +
							res.latitude + ',' + res.longitude;
						that.$http.get(url).then(e => {
							console.log(e)
							that.editForm.address = e.data.result.formatted_address
                            uni.hideLoading()

						}).catch((error) => {
							console.log(error)
							uni.hideLoading()
						});
					},
					fail: function(res) {
						console.log('当前位置的经度');
						uni.hideLoading()
					}
				});
			} else if (option.type == '1') {
				this.isAdd = true
				this.id = option.id;
				this.getSelect(option.id);
				this.bartitle = '巡查上报'

			} else if (option.type == '2') {
				//详情
				this.isAdd = false
				this.id = option.id;
				this.getSelect(option.id);
				this.bartitle = '巡查详情'
			}


		},
		// 从地图选点插件返回后，在页面的onShow生命周期函数中能够调用插件接口，取得选点结果对象
		onShow() {
			const chooseLocation = requirePlugin('chooseLocation');
			const location = chooseLocation.getLocation(); // 如果点击确认选点按钮，则返回选点结果对象，否则返回null
			console.log("您所选择的位置：", location);
			if (location) {
				this.editForm.address = location.address;
				//存储上次选择的信息
				this.location.latitude = location.latitude;
				this.location.longitude = location.longitude;
				this.location.address = location.address;
			}

		},
		onUnload() {
			// 页面卸载时设置插件选点数据为null，防止再次进入页面，geLocation返回的是上次选点结果
			// chooseLocation.setLocation(null);
		},
		methods: {
			ViewImage(e, index) {
				console.log(e);
				let _this = this;
				let imgsArray = [];
				//url预览
				this.editForm.imageList.forEach(e => {
					let picUrl = `${apiUrl}/sys/common/static/${e.imageId}`;
					imgsArray.push(picUrl)
				})
				uni.previewImage({
					current: index,
					urls: imgsArray
				})
			},
			testData(data) {
				console.log(data)
				let arr = data.split(',');
				this.picList = arr;
			},
			submit() {
				this.add()
			},
			add(index) {

				if (this.editForm.pollutionSourceName == '') {
					uni.showToast({
						title: "请填写污染源名称!",
						icon: "none"
					});
					return;
				}
				if (this.editForm.checkedTime == '') {
					uni.showToast({
						title: "请选择采集时间!",
						icon: "none"
					});
					return;
				}
				
				if (this.editForm.address == '') {
					uni.showToast({
						title: "请填写检查地点!",
						icon: "none"
					});
					return;
				}
				this.isSubmit = true
				this.loading2 = true
				console.log('----imageList', this.editForm.imageList)
				this.picList.forEach((e, index) => {
					console.log(this.editForm.imageList.filter(j => j.imageId == e))
					if (!this.oldImgList.includes(e)) {
						let obj = {}
						obj.imageId = e;
						obj.sort = index
						this.editForm.imageList.push(obj)
					}

				})
				this.editForm.imageList.forEach((e, index) => {
					e.sort = index
				})
				console.log('----imageList', this.editForm.imageList)
				let params = Object.assign({}, this.editForm)
				params.status = index.toString()
				console.log(params.checkedTime.length)
				if(params.checkedTime.length<19){
					params.checkedTime = params.checkedTime+':00'
				}
				if (!params.id) {
					// this.$tip.toast('请先保存再提交!')

					this.$http.post(this.addUrl, params).then(res => {
						if (res.data.code == 200) {
							params.id = res.data.result.id;
							params.imageList = res.data.result.imageList;
							console.log(params)
							this.$http.post(this.modifyUrl, params).then(res => {
								console.log(res)
								this.isSubmit = false
								this.loading2 = false
								// uni.hideLoading()
								if (res.data.code == 200) {
									console.log(res.data)
									// this.$tip.toast('提交成功!')
									// this.$Router.push({
									// 	name: 'pollution'
									// })
									uni.navigateBack();



								}

							}).catch((error) => {
								console.log(error)
								this.isSubmit = false
								this.loading2 = false
								//  uni.showToast({
								// icon: 'none',
								// title: `${error}`
								// });
							}).finally(() => {
								this.loading2 = false;
							});;
						}

					})
				} else {
					console.log(params)
					this.$http.post(this.modifyUrl, params).then(res => {
						console.log(res)
						this.isSubmit = false
						this.loading2 = false
						// uni.hideLoading()
						if (res.data.code == 200) {
							console.log(res.data)
							// this.$tip.toast('提交成功!')
							// this.$Router.push({
							// 	name: 'pollution'
							// })
							uni.navigateBack();

						}

					}).catch((error) => {
						console.log(error)
						this.isSubmit = false
						this.loading2 = false
						//  uni.showToast({
						// icon: 'none',
						// title: `${error}`
						// });
					}).finally(() => {
						this.loading2 = false;
					});;
				}

			},
			goMap(add) {

				const key = configService.appKey; //使用在腾讯位置服务申请的key
				const referer = '临渭区VOCs执法监管平台'; //调用插件的app的名称

				const category = '';
				var latitude;
				var longitude;
				var address = add;

				if (this.isAdd) {
					//添加和编辑可选点
					if (address) {
						//如果刚才选中过
						if (address == this.location.address) {
							//  经纬度
							latitude = Number(this.location.latitude);
							longitude = Number(this.location.longitude);
						}
						//百度解析
						// let url =
						// 	`https://api.map.baidu.com/geocoding/v3/?address=${add}&ak=PmTFEuep7FmccxTrTn67TxRn&output=json`;
						// this.$http.get(url).then(e => {
						// 	console.log(e)
						// 	let obj = JSON.parse(JSON.stringify(e.data))
						// 	console.log(obj)
						// 	if (obj.status == 0) {
						// 		//  经纬度
						// 		let latitude = Number(obj.result.location.lat);
						// 		let longitude = Number(obj.result.location.lng);
						// 		let address = add;
						// 		//地图中心点坐标，如果不传则默认当前用户的真实位置坐标
						// 		const location = JSON.stringify({
						// 			latitude: latitude,
						// 			longitude: longitude
						// 		});
						// 		console.log(location)
						// 		wx.navigateTo({
						// 			url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer+ '&location=' + location +'&category=' + category
						// 		});

						// 	}
						// 	})
						
                        //如果刚才选中过
						if (longitude && latitude && address == this.location.address) {
							const location = JSON.stringify({
								latitude: latitude,
								longitude: longitude
							});
							console.log(location)
							wx.navigateTo({
								url: 'plugin://chooseLocation/index?key=' + key + '&referer=' +
									referer + '&location=' + location + '&category=' + category
							});

						} else {
							//腾讯没有缓存的位置信息责查询api获取坐标
							// if(!longitude||!latitude)

							let url =
								`https://apis.map.qq.com/ws/geocoder/v1/?address=${add}&key=${key}`;
							this.$http.get(url).then(e => {
								console.log(e)
								let obj = JSON.parse(JSON.stringify(e.data))
								console.log(obj)
								if (obj.status == 0) {
									//  经纬度
									latitude = Number(obj.result.location.lat);
									longitude = Number(obj.result.location.lng);
									//地图中心点坐标，如果不传则默认当前用户的真实位置坐标
									const location = JSON.stringify({
										latitude: latitude,
										longitude: longitude
									});
									console.log(location)
									wx.navigateTo({
										url: 'plugin://chooseLocation/index?key=' + key + '&referer=' +
											referer + '&location=' + location + '&category=' + category
									});

								}
							})

						}

					} else {
						wx.navigateTo({
							url: 'plugin://chooseLocation/index?key=' + key + '&referer=' + referer +
								'&category=' + category
						});

					}

				} else {
					//详情只可查看
					let url =
						`https://apis.map.qq.com/ws/geocoder/v1/?address=${add}&key=${key}`;
					this.$http.get(url).then(e => {
						console.log(e)
						let obj = JSON.parse(JSON.stringify(e.data))
						console.log(obj)
						if (obj.status == 0) {
							console.log(obj.result.location.lng)
							//  经纬度
							let lat = Number(obj.result.location.lat);
							let long = Number(obj.result.location.lng);
							uni.openLocation({
								// 传入你要去的纬度
								latitude: lat,
								// 传入你要去的经度
								longitude: long,
								// 传入你要去的地址信息 不填则为空
								address: address,
								// 缩放大小
								scale: 18,
								success: function(res) {
									console.log('成功的回调success');
									console.log(res, '经纬度===>')
								},
								// 用户拒绝获取定位后 再次点击触发
								fail: function(res) {
									console.log(res)
								}
							});


						}

					}).catch((error) => {
						console.log(error)
					});
				}



				// uni.navigateTo({
				// 	url: "/pages/map/chooseLocation/chooseLocation"
				// })

			},
			getSelect(id) {
				
				this.isLoaded = false;
				let params = {
					id: id,
				};
				this.$http.get(this.dataUrl, {
					params: params
				}).then(res => {
					console.log(res)
					uni.hideLoading()
					this.isLoaded = true;
					// uni.hideLoading()
					if (res.data.code == 200) {
						console.log(res.data.result)
						this.editForm = res.data.result
						console.log(this.editForm.checkedTime)
						if(this.editForm.checkedTime.length==19){
							this.editForm.checkedTime = this.editForm.checkedTime.substring(0,this.editForm.checkedTime.length-3)
						}
						this.oldImgList = []
						if (this.editForm.imageList && this.editForm.imageList.length > 0) {
							this.editForm.imageList.forEach((e, index) => {
								// e.imageDetails = e.imageThumbnail;
								e.imageThumbnail = e.imageThumbnail.replace(/[\r\n]/g, "");
								this.oldImgList.push(e.imageId)
								if (index == 0) {
									this.imageList = e.imageThumbnail
								} else {
									this.imageList = this.imageList + ',' + e.imageThumbnail
								}


							})
							this.imgSaveData = this.editForm.imageList;
						}



					}

				}).catch((error) => {
					console.log(error)
					uni.hideLoading()
					this.isLoaded = true;
				});

			},
			formSubmit(e) {

				if (this.editForm.pollutionSourceName == '') {
					uni.showToast({
						title: "请填写污染源名称!",
						icon: "none"
					});
					return;
				}
				if (this.editForm.checkedTime == '') {
					uni.showToast({
						title: "请选择采集时间!",
						icon: "none"
					});
					return;
				}
				if (this.editForm.address == '') {
					uni.showToast({
						title: "请选择检查地点!",
						icon: "none"
					});
					return;
				}
				this.isSubmit2 = true
				this.loading = true
				this.editForm.imageList.forEach((o, index) => {
					if (!this.picList.includes(o.imageId)) {
						this.editForm.imageList.splice(index, 1)
					}
				})
				console.log('----imageList', this.editForm.imageList)
				this.picList.forEach((e, index) => {
					console.log(this.editForm.imageList.filter(j => j.imageId == e))
					if (!this.oldImgList.includes(e)) {
						let obj = {}
						obj.imageId = e;
						obj.sort = index
						this.editForm.imageList.push(obj)
					}

				})
				this.editForm.imageList.forEach((e, index) => {
					e.sort = index
				})
				console.log('----imageList', this.editForm.imageList)

				console.log('form发生了submit事件，携带数据为：' + JSON.stringify(e.detail.value))
				let params = Object.assign({}, this.editForm)
				params.status = 1
				console.log(params.checkedTime.length)
				if(params.checkedTime.length<19){
					params.checkedTime = params.checkedTime+':00'
				}
				console.log(params)
				let url;
				if (this.isAdd && this.type == 0) {
					url = this.addUrl
				} else {
					url = this.modifyUrl
				}
				this.$http.post(url, params).then(res => {
					console.log(res)
					this.loading = false
					this.isSubmit2 = false
					if (res.data.code == 200) {
						console.log(res.data)
						uni.navigateBack();

					}

				}).catch((error) => {
					console.log(error)
					this.isSubmit2 = false
					this.loading = false
				}).finally(() => {
					this.loading = false;
				});
			},

			formReset: function(e) {
				console.log('清空数据')
			},
			goDetail(row) {
				console.log(row)
				this.$Router.push({
					name: 'pollutiondetail'
				})
			},
			//u-picker确定
			confirm(e) {
				this.showSex = false;
				this.model1.userInfo.sex = e.value[0].name;
				this.getSelect();

			},
		}
	}
</script>

<style lang="scss" scoped>
	//微信小程序对应能识别的样式修改
	/deep/ .u-textarea {
		// border-radius: 4px;
		// background-color: #fff;
		// position: relative;
		// display: flex;
		// flex-direction: row;
		// flex: 1;
		padding: 5px 0px !important;
	}

	//end
	//时间选择样式修改
	.other /deep/ .cu-form-group {
		padding: 1rpx 0rpx !important;
		background-color: inherit !important;
	}

	.cu-form-group .u-icon--right {
		position: absolute;
		top: 0;
		right: 30rpx;
		bottom: 0;
		display: block;
		margin: auto;
		width: 30rpx;
		height: 30rpx;
		color: #8799a3;
		content: "\e6a3";
		text-align: center;
		font-size: 34rpx;
		font-family: cuIcon;
		line-height: 30rpx;
		margin-top: auto;
		margin-right: auto;
		margin-bottom: auto;
		margin-left: auto;
	}

	.cu-form-group /deep/ .u-textarea {
		background: inherit !important;
		margin-right: 50px;
	}

	.other /deep/ .cu-form-group .title {
		padding-right: 0rpx;
	}

	.cu-list.menu>.cu-item2.arrow {
		padding-right: 0rpx;
	}

	.cu-list.menu>.cu-item2 {
		position: relative;
	}

	.cu-list.menu>.cu-item2.arrow:before {
		position: absolute;
		top: 0;
		right: 30rpx;
		bottom: 0;
		display: block;
		margin: auto;
		width: 30rpx;
		height: 30rpx;
		color: #8799a3;
		content: "\e6a3";
		text-align: center;
		font-size: 34rpx;
		font-family: cuIcon;
		line-height: 30rpx;
		margin-top: auto;
		margin-right: auto;
		margin-bottom: auto;
		margin-left: auto;
	}

	.cu-list.menu>.cu-item2.arrow2:before {
		position: absolute;
		top: 0;
		right: 30rpx;
		bottom: 0;
		display: block;
		margin: auto;
		width: 30rpx;
		height: 30rpx;
		color: #8799a3;
		content: "\e6a3";
		text-align: center;
		font-size: 34rpx;
		font-family: cuIcon;
		line-height: 30rpx;
		margin-top: auto;
		margin-right: auto;
		margin-bottom: auto;
		margin-left: auto;
	}

	.goodName {
		font-size: 30upx;
		line-height: 19px;
		color: #999999;
		padding-left: 10px;
	}

	.good-price {
		font-size: 13px;
	}

	.cu-btn {
		width: calc(100% - 110px);
		height: 90.71upx;
		background-image: linear-gradient(0deg,
				#009cdd 0%,
				#29cd94 100%),
			linear-gradient(#1082ff,
				#1082ff);
		font-size: 21px;


		border-radius: 5px;
	}

	/deep/ .u-textarea--disabled {
		 background-color: #fff !important;
	}

	.cu-btn /deep/ span {
		font-size: 21px !important;
		color: #fff;
		line-height: 90.71upx;
	}

	/deep/ uni-textarea {
		width: 100%;
		height: auto !important;
		min-height: 50px;
	}

	.icon {
		// display: inline-block;
		width: 27.86upx;
		height: 29.29upx;
		// position: relative;
		// top:1px;
		margin-right: 5px;
	}

	/deep/ .cu-custom {
		background-image: linear-gradient(45deg, #1cbbb4, #1cbbb4);
		color: #ffffff;
		position: fixed;
		width: 100%;
		z-index: 1024;
	}
	.cu-bar.fixed2,
	.nav.fixed2 {
	
		top: inherit !important;
		bottom: 0;
	}

	/deep/ .uni-textarea-textarea {
		min-height: 228.57upx;
		width: 100%;
		/* padding: 0 12px; */
		border-radius: 21.43upx;
		box-sizing: border-box;
		font-size: 13px;
		padding: 10px;
	}

	.other /deep/ textarea {
		font-size: 13px;
	}

	textarea {
		font-size: 13px;
	}

	/deep/ .grid.grid-square>uni-view {
		background-color: #ebebeb;
	}

	/deep/ .uni-input-placeholder {
		font-size: 30upx;
		line-height: 23px;
		color: #999999 !important;
	}

	/deep/ .uni-input-input {
		font-size: 12px;
	}

	.main-body {
		width: 100vw;
		height: 100vh;
		overflow-x: hidden;
		overflow-y: scroll;
		background-size: 100% 100%;
	}

	.btnbox {
		color: #fff;
		// width: 100%;
		margin: 0 auto;
		font-size: 14px;
		border-radius: 45.71upx;
		border: none;
	}


	.img-box {
		color: #666666;
		padding: 38.57upx;
		background-color: #ffffff;
		margin-bottom: 10px;
	}

	.title {
		white-space: nowrap;
	}

	.uni-input {
		width: 100%;
		margin-left: 10rpx;
	}

	/deep/ .u-textarea__field {
		// flex: 1;
		font-size: 13px !important;
		color: #606266;
		width: 100%;
		z-index: 0;
	}

	.row_style {
		display: flex;
		flex-direction: row;
		align-items: center;
		margin-top: 0px;

		.title {
			font-size: 30upx;
			color: #666666;
		}


	}

	.placeholderStyle {
		font-size: 13px;
		color: #8F8F8F !important;
	}

	.colum_style {
		display: flex;
		align-items: center;
	}
</style>
